import 'package:flutter/material.dart';

//按钮
class ButtonRoute extends StatefulWidget {
  @override
  _ButtonRoute createState() => new _ButtonRoute();
}

class _ButtonRoute extends State<ButtonRoute> {
  List<Widget> _wls;

  @override
  void initState() {
    super.initState();
    _wls = [
      RaisedButton(
        child: Text("RaisedButton"),
        elevation: 5.0,
        highlightElevation: 10.0,
        disabledElevation: 0.0,
        onPressed: () {},
      ),
      FlatButton(
        child: Text("FlatButton"),
        onPressed: () {},
      ),
      OutlineButton(
        child: Text("OutlineButton"),
        onPressed: () {},
      ),
      IconButton(
        icon: Icon(Icons.thumb_up),
        onPressed: () {},
      ),
      RaisedButton.icon(
        icon: Icon(Icons.send),
        label: Text("RaisedButton_发送"),
        onPressed: () {},
      ),
      OutlineButton.icon(
        icon: Icon(Icons.add),
        label: Text("OutlineButton_添加"),
        onPressed: () {},
      ),
      FlatButton.icon(
        icon: Icon(Icons.fingerprint),
        label: Text("FlatButton_详情"),
        onPressed: () {},
      ),
      FlatButton(
        color: Colors.blue,
        //  color:Color(0x000000),
        highlightColor: Colors.blue[700],
        colorBrightness: Brightness.dark,
        splashColor: Colors.grey,
        child: Text("Submit"),
        shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
        onPressed: () {},
      ),
    ];
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("按钮"),
      ),
      body: Center(
        child: Column(children: _wls),
      ),
    );
  }
}
